package stockService;

public class searchResult {
    static String[] searchres = new String[5];
    public static int count = 0;

    public static void addResult(String searchnow) {
        int i;
        for (i = 0; i < 5; i++) {
            if (searchres[i] == null) {
                searchres[i] = searchnow;
                return;
            } else if (searchres[i].equals(searchnow)) {
                return;
            }
        }
        searchres[count] = searchnow;
        count++;
        if (count == 5) {
            count = 0;
        }
    }

    public static String[] getResult() {
        return searchres;
    }
}
